import QtQuick
import QtQml


ListView {
    id: root

    property string title
    property var target
    property var properties: []

    property color titleColor: "black"
    property color textColor: "black"

    implicitWidth: contentWidth
    implicitHeight: contentHeight

//    clip: true
    header: Rectangle{
        width: root.implicitWidth
        height: titleText.implicitHeight

        Text{
            id: titleText
            color: titleColor
            text: root.title
            font.bold: true
        }
    }

    model: properties
    delegate: Text{
        color: textColor
        text: modelData + " : " + target[modelData]
        style: Text.Outline;
        styleColor: "white"
    }
}
